<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>背景坐标</title>
        <style>
           div{
            border:1px solid #000;
            width:400px;
            height:200px;
            background-image: url(shan.jpg);
            background-repeat: no-repeat;
            background-size: 400px;
            padding:20px;
           }
           .size1{
            background-origin: content-box;
           }
           .size2{
            background-origin: border-box;
           }
        </style>
    </head>
    <body>
        <div class="size1"></div>
        <div class="size2"></div>
    </body>
</html>